<div class="form">




        <?php
        $form = $this->beginWidget('CActiveForm', array(
                'id' => 'post-form',
                'enableAjaxValidation' => true,
                ));
        ?>

        <p class="note">
                Fields with <span class="required">*</span> are required.
        </p>

        <?php echo $form->errorSummary($model); ?>

        <div class="row">
                <?php echo $form->labelEx($model, 'title'); ?>
                <?php echo $form->textField($model, 'title', array('size' => 85, 'maxlength' => 128)); ?>
                <?php echo $form->error($model, 'title'); ?>
        </div>

        <div class="row">
                <?php echo $form->labelEx($model, 'content'); ?>
                <?php //echo $form->textArea($model,'content',array('rows'=>6, 'cols'=>50)); ?>
                <?php
                $this->widget('application.extensions.tinymce.ETinyMce', array(
                        'name' => 'Post[content]',
                        'value' => '<p style="font-size:16px">'.$model->content.'</p>',
                ));
                ?>
                <?php echo $form->error($model, 'content'); ?>
        </div>

        <div class="row">
                <?php echo $form->labelEx($model, 'tags'); ?>
                <?php echo $form->textArea($model, 'tags', array('rows' => 1, 'cols' => 85)); ?>
                <?php
                $this->widget('zii.widgets.jui.CJuiAutoComplete', array(
                        'name' => 'city',
                        'source' => $tagArray,
                        // additional javascript options for the autocomplete plugin
// 			    'options'=>array(
// 			        'minLength'=>'2',
// 			),
// 			    'htmlOptions'=>array(
// 			        'style'=>'height:20px;'
// 			),
                ));
                ?>
                <?php echo $form->error($model, 'tags'); ?>
        </div>

        <div class="row">
                <?php echo $form->labelEx($model, 'status'); ?>
                <?php echo $form->dropDownList($model, 'status', Lookup::items('PostStatus')); ?>	
                <?php echo $form->error($model, 'status'); ?>
        </div>

        <div class="row">
                <?php echo $form->labelEx($model, 'author'); ?>
                <?php echo Yii::app()->user->username; ?>
        </div>

        <div class="row buttons">
                <?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
        </div>

        <?php $this->endWidget(); ?>

</div>
<!-- form -->
